
   <!-- <div id="dlg" class="easyui-dialog" title="管理员登录" data-options="closable:false," style="width:400px;height:275px;padding:10px">-->
   <h1>home/index.html</h1>
<div>
        <div class="easyui-panel" title="登录博客后台" style="width:400px;padding:30px 70px 20px 70px;">
            <form id="form" method="post">
            <div style="margin-bottom:10px">
                <input class="easyui-textbox" name="aname" style="width:100%;height:40px;padding:12px" data-options="prompt:'用户名',iconCls:'icon-man',iconWidth:38">
            </div>
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="apassword" type="password" placeholder="密码" style="width:100%;height:40px;padding:12px" data-options="iconCls:'icon-lock',iconWidth:38">
            </div>
            <div style="margin-bottom:20px">
                <input type="checkbox" checked="checked">
                <span>记住密码</span>
            </div>
            <div>
                <a id="btn-submit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;">
                    <span id="submit_text" style="font-size:14px;">登录</span>
                </a>
            </div>
            </form>
        </div>
</div>

       <!-- <form id="ff" method="post" style="padding:30px;padding-left:70px;">
            <div>   
                <label for="admin_name">用户名:</label>   
                <input class="easyui-validatebox" type="text" name="aname" data-options="required:true" />   
            </div> 
            <br/> 
           
            <div>   
                <label for="admin_password">密　码:</label>   
                <input class="easyui-validatebox" type="text" name="apassword" />   
            </div>  
             <br/> 
            
            <div>   
                <label for="admin_password">验证码:</label>   
                <?=$image;?>
            </div> 
            <br/>
            <div style="padding-left:50px;padding-top:10px;">
                <a id="btn-submit" class="easyui-linkbutton" style="width:150px;" data-options="">提交</a>
            </div> 
        </form>  -->
  <!--  </div>-->
    <script type="text/javascript">
        var _option=[];
        _option['test']="123";
        _option['国家']="中国";
        $(function(){

            //表单
            $('#form').form({
                    url:"<?=site_url('admin/privilege/dologin');?>",    
                    onSubmit: function(param){

                        $("#btn-submit").linkbutton({
                            iconCls: 'icon-reload'
                        });
                        $("#submit_text").text("登录中...");

                    },
                    //登录成功
                    success:function(data){  
                        var data = eval('(' + data + ')');
                        if(!data.isok)
                        {
                            $("#btn-submit").linkbutton({
                                iconCls: 'icon-ok'
                            });
                            $("#submit_text").text("登录");
                            $.messager.show({title:'提示',msg:data.error, style:{left:755,right:100,top:300}});
                            return ;
                        }
                        window.location.href="<?=site_url('admin/admin/index');?>";
                    }   
                });  

            //点击提交
            $("#btn-submit").click(function(){
                //$.messager.progress();
                $('#form').submit();
            })
           
        })
        

    </script>

